let computed = {
  // 列表数据
  listData() {
    let getList = this.$store.state.problemProcess.listData
    getList.list = getList.list || []
    getList.list.map(item => {
      this.$set(item, 'inputQuantity', item.inputQuantity || item.turnoverProductionQuantity)
    })
    return getList
  },
  // 任务日志
  logList() {
    return this.$store.state.problemProcess.logList
  },
  // 撤销按钮
  cancelBtnStatus() {
    let status = false
    if (this.selectItems.some((item) => item.problemProcessStatusValue !== 'Unprocessed')) {
      status = true
    }
    return {
      status: status,
      content: '请选择处理状态为"待处理"的数据'
    }
  },
  tableColConfig() {
    let tableColConfig = [
      {prop: 'turnoverNumberQueryByLike', label: '周转码', noChecked: true, noForCol: true, noExport: true},
      {
        prop: 'turnoverNumber',
        label: '周转码',
        noSearch: true,
        colConfig: {minWidth: 240, fixed: 'left', align: 'left', sortable: 'custom'}
      },
      {
        prop: 'problemProcessStatusLabel',
        label: '处理状态',
        filterAble: true,
        searchConfig: {name: 'handleStatusId', type: 'select', dict: 'problemProcessStatus'},
        colConfig: {minWidth: 105, fixed: 'left', align: 'center', comp: 'ProcessState'}
      },
      {
        prop: 'turnoverStatusLabel',
        label: '周转状态',
        filterAble: true,
        searchConfig: {name: 'turnoverStatusId', type: 'select', dict: 'batchStatus'},
        colConfig: {minWidth: 105, fixed: 'left', align: 'center', comp: 'TurnoverStatus'}
      },
      {
        prop: 'createProblemDate',
        label: '问题创建时间',
        searchConfig: {type: 'date'},
        colConfig: {minWidth: 170}
      },
      {prop: 'workstageName', label: '发起工序', colConfig: {minWidth: 120, align: 'left'}},
      {prop: 'workcenterName', label: '发起工作中心', colConfig: {minWidth: 140}},
      {prop: 'inputQuantity', label: '投料数量', noSearch: true, colConfig: {minWidth: 100, sortable: false}},
      {prop: 'submitterName', label: '发起人', colConfig: {minWidth: 110}},
      {prop: 'handlerName', label: '处理人', colConfig: {minWidth: 110}},
      {
        prop: 'qmsProcessStatusId',
        label: '审理状态',
        searchConfig: {type: 'select', dict: 'QMSProcessStatus'},
        colConfig: {minWidth: 105, comp: 'ReceiptStatus'}
      },
      {prop: 'description', label: '问题描述', colConfig: {minWidth: 160, align: 'left', sortable: false}},
      {prop: 'transferDescription', label: '转签描述', colConfig: {minWidth: 160, align: 'left', sortable: false}},
    ]
    return tableColConfig
  },
  // 列循环
  columnList() {
    return this.tableColConfig.filter(item => item.noForCol !== true && item.isShow !== false)
  },
}
export default computed
